package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_person")
public class Person extends Model<Person> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "person_id", type = IdType.ASSIGN_ID)
    private String personId;
    /**
     * 用户账号
     */
    @TableField("account")
    private String account;
    /**
     * 用户密码
     */
    @TableField("password")
    private String password;
    /**
     * 姓名
     */
    @TableField("person_name")
    private String personName;
    /**
     * 身份证号
     */
    @TableField("id_card")
    private String idCard;
    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;
    /**
     * 用户性别
     */
    @TableField("sex")
    private String sex;
    /**
     * 用户邮箱
     */
    @TableField("email")
    private String email;
    /**
     * 用户头像
     */
    @TableField("avatar")
    private String avatar;
    /**
     * 用户状态:0正常 1停用
     */
    @TableField("user_status")
    private Integer userStatus;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 机构ID
     */
    @TableField("org_id")
    private String orgId;

    public void freeData() {
        this.personId = null;
        this.account = null;
        this.password = null;
        this.personName = null;
        this.idCard = null;
        this.phone = null;
        this.sex = null;
        this.email = null;
        this.avatar = null;
        this.userStatus = null;
        this.addTime = null;
        this.updateTime = null;
        this.orgId = null;
    }

}
